<?php include COMMON_PATH.'/header.html';?>
<div class="layui-container fly-marginTop fly-user-main">
    <?php include COMMON_PATH.'/product-nav.html';?>
    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="">
            <ul class="layui-tab-title" id="LAY_mine">
                <li lay-id="info"><a href="/member/product/">出售资源</a></li>
                <li class="layui-this" lay-id="info">编辑</a></li>
            </ul>
			
				<div class="layui-tab layui-tab-brieff">
					<ul class="layui-tab-title">
						<li class="layui-this">编辑</li>
						<li>安全设置</li>
						<li>链接代码</li>
					</ul>
					<div class="layui-tab-content">
						<div class="layui-tab-item layui-show">
							<form class="layui-form layui-form-pane" method="post" id="products_form">
								<div class="layui-form-item">
									<label for="name" class="layui-form-label">资源名称</label>
									<div class="layui-input-block">
										<input type="text" id="name" name="name" lay-verify="required" autocomplete="off" value="<?php echo $product['name'];?>" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">单份内容</label>
									<div class="layui-input-block">
										<input type="radio" name="isfaka" lay-filter="isfaka" <?php if($product['isfaka']=='0' ):?>checked=""<?php endif;?> readonly disabled value="0" title="(买家付费后看到的信息是一样的)">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">多份内容</label>
									<div class="layui-input-block">
										<input type="radio" name="isfaka" lay-filter="isfaka" <?php if($product['isfaka']=='1' ):?>checked=""<?php endif;?> readonly disabled value="1" title="(买家付费后看到的信息是独立的，一行一条，售完即止)">
									</div>
								</div>
								<div class="layui-form-item">
									<label for="price" class="layui-form-label">单价</label>
									<div class="layui-input-inline">
										<input type="number" id="price" name="price" lay-verify="required" autocomplete="off" value="<?php echo $product['price'];?>" class="layui-input">
									</div>
									<div class="layui-form-mid layui-word-aux">单价不能低于1元</div>
								</div>
								
								<div class="layui-form-item">
									<label class="layui-form-label">是否销售</label>
									<div class="layui-input-block">
										<input type="radio" name="active" value="1" title="在售" <?php if($product['active']=='1' ):?>checked=""<?php endif;?>>
										<input type="radio" name="active" value="0" title="停售" <?php if($product['active']=='0' ):?>checked=""<?php endif;?>>
									</div>
								</div>

								<div class="layui-form-item">
									<input type="hidden" name="method" value="edit">
									<input type="hidden" name="id" id="pid" value="<?php echo $product['id'];?>">
									<button class="layui-btn" lay-filter="edit" lay-submit>确认修改</button>
								</div>
							</form>
						</div>
						<div class="layui-tab-item">
							<form class="layui-form layui-form-pane" method="post" id="products_form">
								<div class="layui-form-item layui-form-text">
									<label for="urls" class="layui-form-label">授权域名</label>
									<div class="layui-input-block">
										<textarea placeholder="" id="urls" name="urls" lay-verify="required" autocomplete="off" class="layui-textarea" style="height: 80px;"><?php echo $urls;?></textarea>
									</div>
									<div class="layui-form-mid layui-word-aux">一行一个，最多3个域名</div>
								</div>
								<div class="layui-form-item">
									<input type="hidden" name="method" value="auth_edit">
									<input type="hidden" name="id" id="pid" value="<?php echo $product['id'];?>">
									<button class="layui-btn" lay-filter="edit" lay-submit>确认修改</button>
								</div>
							</form>
						</div>

						<div class="layui-tab-item">
							<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
							  <legend>专属代码</legend>
							</fieldset>
							<pre class="layui-code" lay-title="html" lay-skin="notepad">
							&lt;div class=&quot;zlkbpay-content&quot; data-hashid=&quot;<?php echo $product['hashid'];?>&quot;&gt;&lt;/div&gt;
							&lt;script charset=&quot;utf-8&quot; type=&quot;text/javascript&quot; src=&quot;https://pay.zlkb.net/api/js/elements.js&quot;&gt; &lt;/script&gt;
							</pre>

							<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
							  <legend>效果展示</legend>
							</fieldset>
							<div class="zlkbpay-content" data-hashid="<?php echo $product['hashid'];?>"></div>
							<script charset="utf-8" type="text/javascript" src="https://pay.zlkb.net/api/js/elements.js"></script>
						</div>
						
					</div>
				</div>
			

        </div>
    </div>
</div>
<!--引入公共底文件-->
<?php include COMMON_PATH.'/footer.html';?>
<script>
layui.use('memberproduct');
</script>